Skip to content

.Net: Allow the MongoDB VectorData tests to run without an image#12860

Merged
westey-m merged 1 commit into
microsoft:mainfrom
damieng:allow-mongodb-tests-with-connection-string
Aug 6, 2025
Merged

.Net: Allow the MongoDB VectorData tests to run without an image#12860
westey-m merged 1 commit into
microsoft:mainfrom
damieng:allow-mongodb-tests-with-connection-string

Conversation

@damieng

@damieng damieng commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

Motivation and Context

We are running the SK tests in our https://github.com/mongodb-labs/ai-ml-pipeline-testing repo and would like to also be able to run them against live MongoDB Atlas clusters for further verification rather than just the Docker image.

Description

The PR adjusts the vector data tests (only as per @roji recommendation) so that if an environment variable named MONGODB__CONNECTIONURL exists then that is used to connect to MongoDB rather than using TestContainers to fire up a Docker image of MongoDB Atlas.

Additionally to improve reliability it was found that we need to increase the number of attempts to wait for the data to be ready after creating an index. (Bumped from 20 to 200). We're going to look at adding index status helper methods in the C# Driver going forward for a better experience.

Once this is done we should be able to fully enable the new tests on our repo and diagnose any further instabilities and then be able to submit a PR to fully-enable the image-based tests here.

Contribution Checklist

@damieng damieng requested a review from a team as a code owner August 5, 2025 08:00
@moonbox3 moonbox3 added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Aug 5, 2025
@github-actions github-actions Bot changed the title Allow the MongoDB VectorData tests to run without an image. .Net: Allow the MongoDB VectorData tests to run without an image. Aug 5, 2025
@damieng damieng changed the title .Net: Allow the MongoDB VectorData tests to run without an image. .Net: Allow the MongoDB VectorData tests to run without an image Aug 5, 2025
@damieng damieng force-pushed the allow-mongodb-tests-with-connection-string branch from b54fffb to e9bf06e Compare August 6, 2025 03:22
@moonbox3 moonbox3 removed the kernel Issues or pull requests impacting the core kernel label Aug 6, 2025
@westey-m westey-m enabled auto-merge August 6, 2025 10:46
@westey-m westey-m added this pull request to the merge queue Aug 6, 2025
Merged via the queue into microsoft:main with commit 482ca5d Aug 6, 2025
19 checks passed
jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
…rosoft#12860)

### Motivation and Context

We are running the SK tests in our
https://github.com/mongodb-labs/ai-ml-pipeline-testing repo and would
like to also be able to run them against live MongoDB Atlas clusters for
further verification rather than just the Docker image.

### Description

The PR adjusts the vector data tests (only as per @roji recommendation)
so that if an environment variable named `MONGODB__CONNECTIONURL` exists
then that is used to connect to MongoDB rather than using TestContainers
to fire up a Docker image of MongoDB Atlas.

Additionally to improve reliability it was found that we need to
increase the number of attempts to wait for the data to be ready after
creating an index. (Bumped from 20 to 200). We're going to look at
adding index status helper methods in the C# Driver going forward for a
better experience.

Once this is done we should be able to fully enable the new tests on our
repo and diagnose any further instabilities and then be able to submit a
PR to fully-enable the image-based tests here.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Issue or Pull requests regarding .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants